<script>
        $(".copy").each(function(){
            var clip=null;
            clip = new ZeroClipboard($(this));
            clip.on("ready", function() {
                //alert( "ZeroClipboard SWF is ready!" );
                clip.on("aftercopy", function(event) {
                    alert("该地址已经复制，你可以使用Ctrl+V 粘贴");
                });
            });
            clip.on("error", function(event) {
                alert('请开启浏览器的Flash功能！ error[name="' + event.name + event.message);
                // alert("复制失败，请重试");
                ZeroClipboard.destroy();
            });
        });

</script>
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${ctxPath}/system/cms/site" method="post">
        <input type="hidden" name="pageSize" value="${model.pageSize!}">
        <input type="hidden" name="pageCurrent" value="${model.pageNum!}">
        <div class="bjui-searchBar">
            <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">刷新数据</a>
            &nbsp;
            <a   href="${ctxPath}/system/cms/ad/input" class="btn btn-green" data-icon="plus" data-toggle="dialog"  data-resizable="true"  data-width="800" data-height="600" data-id="add-ad"  data-title="添加广告">添加广告</a>
            <div class="pull-right">
                <!--<button type="button" class="btn-blue" data-url="ajaxDone2.html?id={#bjui-selected}" data-toggle="doajax" data-confirm-msg="确定要删除选中项吗？" data-icon="remove" title="可以在控制台(network)查看被删除ID">删除选中行</button>&nbsp;-->
                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">复选框-批量操作<span class="caret"></span></button>
                    <ul class="dropdown-menu right" role="menu">
                        <!--<li><a href="book1.xlsx" data-toggle="doexport" data-confirm-msg="确定要导出信息吗？">导出<span style="color: green;">当前页</span></a></li>-->
                        <!--<li class="divider"></li>-->
                        <li><a href="${ctxPath}/system/cms/ad/delete" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-idname="clientId" data-group="ids">删除<font COLOR="#ff6347">选中</font>行</a></li>
                        <!--<li><a href="ajaxDone2.html" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-idname="delids" data-group="ids">删除选中</a></li>-->
                    </ul>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="true">
        <thead>
            <tr>
                <th align="center"  width="25">No</th>
                <th align="center"  width="100">广告名称</th>
                <th align="center"  width="80">开始时间</th>
                <th align="center"  width="80">结束时间</th>
                <th align="center" width="100">排序No</th>
                <th align="center"  width="100">分组名称</th>
                <th align="center" width="26" ><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                <th align="center"  width="80">操作</th>
            </tr>
        </thead>
        <tbody>
        @for(ad in model.list){
        <tr data-id="${adLP.index}">
            <td align="center">${ad.id!}</td>
            <td align="center">${ad.adName!"N/A",xss}</td>
            <td align="center">${ad.startDate!"N/A",dateFormat="yyyy-MM-dd"}</td>
            <td align="center">${ad.endDate!"N/A",dateFormat="yyyy-MM-dd"}</td>
            <td align="center">${ad.sortId!"N/A",xss}</td>
            <td align="center">${ad.groupId!,xss}</td>
            <td  align="center"><input type="checkbox" name="ids" data-toggle="icheck" value="${ad.id!}"></td>
            <td  align="center">
                <a  data-clipboard-text='<script language="JavaScript" src="${baseURL}/ad/js/${ad.id!}" type="text/javascript"></script>' class="btn btn-default copy" title="复制广告地址" >复制</a>
                <a href="${ctxPath}/system/cms/ad/input?id=${ad.id!}" class="btn btn-green"  data-toggle="dialog" title="编辑广告"  data-resizable="false"  data-width="800" data-height="600" data-id="edit-ad-tab"  data-title="广告修改">编辑</a>
                <a href="${ctxPath}/system/cms/ad/delete?ids=${ad.id!}" class="btn btn-red" data-toggle="doajax" title="删除广告" data-confirm-msg="确定要删除该行信息吗？">删</a>
            </td>
        </tr>
        @}
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="30">30</option>
                <option value="60">60</option>
                <option value="120">120</option>
                <option value="150">150</option>
            </select>
        </div>
        <span>&nbsp;条，共 ${model.total!} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="${model.total!}" data-page-size="30" data-page-current="1">
    </div>
</div>